import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vite.dev/config/  http://blogapi.shbwyz.com
export default defineConfig({
  plugins: [react()],
  server: {
     proxy: {
      // 选项写法
      '/api': {
        target: 'http://blogapi.shbwyz.com',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      }
    }
  }
})
